
#include <ukapi.h>
#include <math.h>

/* Algo d'Euclide */
long math_pgcd(long a, long b)
{
    register long c;

    while (b != 0)
    {
       c = a % b;
       a = b;
       b = c;
    }
    return abs( a );
}
